<template>
	<view>
		<TopHead :title="'知道上门'" :fhShow="fhShow"></TopHead>
		<view class="conbox">
			<service-list  :list="hotList" ></service-list>
		</view>
	</view>
</template>

<script>
	import TopHead from '../../components/topHead/topHead.vue';
	import ServiceList from '@/components/basics/serviceList.vue';
	export default {
		components: {
			TopHead,
			ServiceList
		},
		data() {
			return {
				fhShow: false, // 不显示返回按钮
				hotList: [],
				list:[
					{
						name:'郑毅',
						headImage:'https://ceres.zkthink.com/static/img/user/morentouxiang.png',
						score: 4,
						comment:'这是一个好问题，但是你不配得到答案，这是一个好问题，但是你不配得到答案...',
						images:['https://ceres.zkthink.com/static/img/user/morentouxiang.png','https://ceres.zkthink.com/static/img/user/morentouxiang.png'],
						createTime:'202403-19 16:30',
						
					}
				]


			}
		},
		onLoad() {

		},
		onShow() {

			  this.initData()
		},
		onReachBottom() {
			// 触底分页
			console.log('触底')
			// if (this.total > this.list.length) {
			// 	this.page = parseInt(this.page) + 1
			// }
		},
		methods: {
			// 数据请求示例
			
			initData() {
				let _this = this;
				var data={status:1,useMethod:5}
				_this.$http.fetchData({
					url: '/wechatApplet/customer/productEntity/',
					method: 'GET',
					data: data,
					success(res) {
						// uni.showToast({
						// 	title: res.message,
						// 	icon: 'none'
						// });
						console.log("res",res);
						_this.hotList = [..._this.hotList, ...res.data.list]
						 
					 
						this.total = res.data.total
					//	let listData = res.data
						// if (res.total == 1) {
						// 	let id = listData[0].id
						// 	let total = this.total
						// 	let paramsStr = `?biaoduan_id=${id}&biaoduanTotal=${total}`
						// 	uni.redirectTo({
						// 		url: `/pages/procedureList/procedureList${paramsStr}`
						// 	})
						// }
					}
				})
			},
			// dianhua
			phoneCall(item) {
				uni.makePhoneCall({
					phoneNumber: '023-62433333' //仅为示例
				});
			},


		}
	}
</script>

<style scoped>
	.headBox {
		font-size: 36rpx;
		font-family: Microsoft YaHei, Microsoft YaHei-Bold;
		font-weight: 700;
		text-align: center;
		color: #232323;
		padding-top: 88rpx;
		padding-left: 30rpx;
		padding-right: 30rpx;
		padding-bottom: 112rpx;
		background: linear-gradient(89deg, #f9d7a6 1%, #ffdc95 100%);
	}

	.headBox .wzText {
		line-height: 56rpx;
	}

	.conbox {
		padding: 30rpx;
		padding-top: 160rpx;
	}

	.title1 {
		font-size: 28rpx;
		font-family: Microsoft YaHei, Microsoft YaHei-Bold;
		font-weight: 700;
		color: #5d4529;
		padding-bottom: 50rpx;
		border-bottom: 2rpx solid rgba(94, 94, 94, 0.1);
	}

	.title1 text {
		font-size: 28rpx;
		font-family: Microsoft YaHei, Microsoft YaHei-Regular;
		font-weight: 400;
		color: #5d4529;
		margin-left: 94rpx;

	}

	.title2 {
		font-size: 28rpx;
		font-family: Microsoft YaHei, Microsoft YaHei-Bold;
		font-weight: 700;
		border-bottom: 2rpx solid rgba(94, 94, 94, 0.1);
		padding: 50rpx 0;
		color: #5d4529;
		position: relative;
	}

	.title2 button {
		position: absolute;
		top: 0;
		left: 0;
		width: 100%;
		height: 100%;
		opacity: 0;
		z-index: 2;
	}

	.title2 .right {
		position: absolute;
		right: 0;
		top: 50%;
		margin-top: -20rpx;
	}
</style>